﻿using LxBasic;

namespace LxCore
{
    public interface IJsonReader
    {
        bool ReadBool();
        int ReadInt();
        double ReadDouble();
        Vector3d ReadVector3d();
        string ReadObjectString();
        string ReadString();
        TEnum ReadEnum<TEnum>() where TEnum : struct;
        void ReadObject<T>(T jsonObject, Action<T> setValue = null, Func<Type, T> createValue = null) where T : JsObject;
        void ReadList<T>(JsList<T> jsonArray, Func<Type, T> createValue) where T : JsObject;
 
        void ReadDoubleArray(double[] doubleArray, Action<double[]> setValue);
        void ReadVector2dArray(Vector2d[] vectorArray, Action<Vector2d[]> setValue);
        void ReadVector3dArray(Vector3d[] vectorArray, Action<Vector3d[]> setValue);
        void ReadInnFaceArray(FvInnFace[] faces, Action<FvInnFace[]> setValue);
        void ReadBouFaceArray(FvBouFace[] bFaces, Action<FvBouFace[]> setValue);
        IndexRange ReadIndexRange();
        void ReadMonitorSelector(UserMonitor m);
        void ReadGraphSelector(Graph g);
    }
}
